#include "Transformations.h"

Transformations::Transformations()
{
}
/*----------------------------------------------------------------------------*/
/*Gets a string and returns the correspondent flot number.
 * */
float Transformations::toFloat(string s){
	stringstream tmp;
	float f;
	
	tmp << s;
	tmp >> f;
	return f;	
}
/*----------------------------------------------------------------------------*/
/*Gets string and returns the correspondent integer number.
 * */
int Transformations::toInt(string s){
	stringstream tmp;
	int i;
	
	tmp << s;
	tmp >> i;
	return i;	
}
/*----------------------------------------------------------------------------*/
/*Gets a integer and returns the correspondent string.
 * */
string Transformations::toString(int i){
	stringstream tmp;
	string str;
	
	tmp << i;
	tmp >> str;
	
	return str;
}
/*----------------------------------------------------------------------------*/
/*Gets a float number and returns the correspondent string.
 * */
string Transformations::toString(float f){
	stringstream tmp;
	string str;
	
	tmp << f;
	tmp >> str;
	
	return str;
}
/*----------------------------------------------------------------------------*/
/*Gets a double number and returns the correspondent string.
 * 
string Transformations::toString(double f){
	stringstream tmp;
	string str;
	
	tmp << f;
	tmp >> str;
	
	return str;
}
*/
/*----------------------------------------------------------------------------*/
int Transformations::toInt(char* c){
	stringstream tmp;
	int i;
	
	tmp << c;
	tmp >> i;
	
	return i;
}
/*----------------------------------------------------------------------------*/
double Transformations::toDouble(string c){
	stringstream tmp;
	double d;
	
	tmp << c;
	tmp >> d;
	
	return d;
}
/*----------------------------------------------------------------------------*/
Transformations::~Transformations()
{
}
